﻿#region File and License Information
/*
<File>
	<License>
		Copyright © 2009 - 2017, Daniel Vaughan. All rights reserved.
		This file is part of Calcium (http://calciumsdk.net), 
		which is released under the MIT License.
		See file /Documentation/License.txt for details.
	</License>
	<CreationDate>2011-05-29 19:12:26Z</CreationDate>
</File>
*/
#endregion


using System;

namespace Outcoder.Services
{
	/// <summary>
	/// This service provides information on the current page location 
	/// and allows the client to navigate within the application.
	/// </summary>
	public interface INavigationService
	{
		/// <summary>
		/// Navigates to the previous page.
		/// </summary>
		void GoBack();

		/// <summary>
		/// Indicates that the application is able 
		/// to navigate to the previous page.
		/// </summary>
		bool CanGoBack { get; }

#if !WINDOWS_PHONE && !SILVERLIGHT && !__IOS__ && !MONODROID
		/// <summary>
		/// Navigates to the specified page type.
		/// </summary>
		/// <param name="pageType">The page is resolved using its type.</param>
		/// <param name="parameter">Any parameters that the page might be expecting.</param>
		void Navigate(Type pageType, object parameter = null);
#endif

#if WINDOWS_UWP || NETFX_CORE
		/// <summary>
		/// The <c>System.Type</c> of the page that is active.
		/// </summary>
		Type SourcePageType { get; }
#else
		/// <summary>
		/// Navigates to the specified URI.
		/// </summary>
		/// <param name="source">The source URI.</param>
		void Navigate(Uri source);
		
		/// <summary>
		/// Navigates to the specified relative URL.
		/// The URL should be relative to the root of the application 
		/// and begin with a slash e.g., "/Views/Settings.xaml".
		/// </summary>
		/// <param name="relativeUrl">The relative URL.</param>
		void Navigate(string relativeUrl);
		
		/// <summary>
		/// The URI of the current page.
		/// </summary>
		Uri Source { get; }
#endif

	}
}
